Skip to content

Instantly share code, notes, and snippets.

@olets
olets / zsh-plugin-manager-plugin-installation-procedures.md
Last active May 18, 2024 01:16
zsh plugin manager cross-reference

Instructions for installing zsh plugins, for a variety of plugin managers

  • antibody: Add <owner>/<repo> to your plugins file. If you use static loading update the sh.

  • Antigen: Add antigen bundle <owner>/<repo> to your .zshrc.

  • Oh-My-Zsh:

    • Clone to OMZ's plugins' directory:
@jnimety
jnimety / implicit_tls_ftp.rb
Last active May 18, 2024 01:14
Ruby Net::FTP Implicit TLS
# Assumes a recent version of ruby with TLS and Explicit TLS support
class ImplicitTlsFTP < Net::FTP
FTP_PORT = 990
def connect(host, port = FTP_PORT)
synchronize do
@host = host
@bare_sock = open_socket(host, port)
begin
ssl_sock = start_tls_session(Socket.tcp(host, port))
@KZeni
KZeni / freemius-killer.php
Last active May 18, 2024 01:13 — forked from thefrosty/freemius.php
Freemius Killer: A WordPress plugin that keeps your site lightweight by preventing the Freemius middleware from ever coming into play. Best when running Freemius' own "Freemius Fixer" plugin while this is enabled to purge existing Freemius data while this keeps it away. *NOTE:* This plugin manually specifies the plugins that use Freemius to then…
<?php
// REQUIRED: Make sure to edit the last few lines to assign the global variable that any particular Freemius/FS-enabled plugin wants to use to have this intercept it (if not already included below.)
// Please, any revisions for **adding more plugin to be supported by default** and/or better accommodating things are welcome at: https://gist.github.com/KZeni/7afbd8b9a94c23aa0a9133d4ce767d0b
// One would like to think this could grow to automatically intercept all plugins trying to use Freemius, but manual editing & updating a gist (maybe eventually getting to the point of being a plugin with automatic updates [be it via a WP.org plugin listing, its own built-in updater like PUM, GitHub repo where sites have plugins check a repo for new releases, etc.])
// Based on: https://gist.github.com/thefrosty/d9bb001c05a407ba1aaa60c8b75aeb43 (via https://austin.passy.co/2024/disable-freemius-in-wordpress-plugins/)
declare(strict_types=1);
/**
* Create an override function, as to bypass Freemius in plugins that in
@jrelo
jrelo / gcc-security.txt
Last active May 18, 2024 01:13
GCC security related flags reference.
Source material:
http://security.stackexchange.com/questions/24444/what-is-the-most-hardened-set-of-options-for-gcc-compiling-c-c
https://wiki.gentoo.org/wiki/Hardened_Gentoo
https://wiki.debian.org/Hardening
================================================================================================================>
GCC Security related flags and options:
CFLAGS="-fPIE -fstack-protector-all -D_FORTIFY_SOURCE=2"
LDFLAGS="-Wl,-z,now -Wl,-z,relro"
@dani7120
dani7120 / BarCodeSample
Created March 23, 2017 14:46
Barbecue Bar code generator example in java (barbecue-1.5-beta1.jar)
import java.io.File;
import net.sourceforge.barbecue.Barcode;
import net.sourceforge.barbecue.BarcodeException;
import net.sourceforge.barbecue.BarcodeFactory;
import net.sourceforge.barbecue.BarcodeImageHandler;
import net.sourceforge.barbecue.output.OutputException;
public BarCodeSample() {
}
@andersondanilo
andersondanilo / instructions.md
Last active May 18, 2024 01:05
ms2109 linux (MacroSilicon USB Video)

Play

ffplay -f video4linux2 -framerate 60 -video_size 1920x1080 -input_format mjpeg /dev/video2

You can try other video number (video3, video4)

Maybe you need:

Create: /etc/udev/rules.d/91-hdmi-to-usb-ms2109.rules With:

import argparse
import csv
import glob
import os
from pathlib import Path
import cv2
import numpy as np
import torch
from PIL import Image
@font-face {
font-family: 'Netflix Sans';
font-weight: 100;
font-display: optional;
src: url(https://assets.nflxext.com/ffe/siteui/fonts/netflix-sans/v3/NetflixSans_W_Th.woff2) format('woff2'),url(https://assets.nflxext.com/ffe/siteui/fonts/netflix-sans/v3/NetflixSans_W_Th.woff) format('woff')
}
@font-face {
font-family: 'Netflix Sans';
@MoisesTedeschi
MoisesTedeschi / Lista de comandos do Git
Last active May 18, 2024 00:44
Lista dos principais comandos do Git que vivo esqucendo - Lembrete.
Comandos do git
git commit -m"contaúdo da mensagem de commit": Gravação de arquivo no git. Esse comando serve para commitar os arquivos no git.
O "-m" é referete ao termo "mensseger". Ou seja, mensagem que será gravada no commit.
ctrl + l = É o comando que limpa a tela do terminal do git.
git log: Comando para visualizar os logs dos arquivos gravados no repositório.
git remote add origin + endereço da pasta no github: Esse comando permite apontar para o repositório no github.
@coaxial
coaxial / config.yaml
Created May 10, 2018 17:21
borgmatic example config
# Where to look for files to backup, and where to store those backups. See
# https://borgbackup.readthedocs.io/en/stable/quickstart.html and
# https://borgbackup.readthedocs.io/en/stable/usage.html#borg-create for details.
location:
# List of source directories to backup (required). Globs and tildes are expanded.
source_directories:
- /home
- /etc
- /var/log/syslog*